package com.nx.samuel.notify_demo.consumer.impl;


import com.nx.samuel.notify_demo.api.NotifyService;

import java.util.HashMap;
import java.util.Map;


public class NotifyServiceImpl implements NotifyService {

    public Map<Integer, Object> retMap = new HashMap<>();

    @Override
    public void onReturn(String name, int id) {
        retMap.put(id, name);
        System.out.println("onReturn Hello name: " + name + ", id:" +id);
    }

    @Override
    public void onThrow(Throwable ex, int id) {
        retMap.put(id, ex);
        System.out.println("onThrow Hello ex: " + ex + ", id:" +id);
    }
}
